/**
 * 设置语言代码
 * @param languageCode
 * @constructor
 */
const setLanguageCode = (languageCode:string)=>{
    localStorage.setItem('languageCode',languageCode);
}

/**
 * 获取语言代码
 * @returns {string}
 * @constructor
 */
const getLanguageCode = ()=>{
    const loanguageCode = localStorage.getItem('languageCode') || navigator.language || "en_US";
    return loanguageCode.replace("_","-");
}

export default {
    setLanguageCode,
    getLanguageCode
};